package com.cgg.stock.common.util;

public enum ResultEnums {

    OK(20000, "请求成功"),
    CREATED(20001, "创建成功"),
    DELETED(20004, "删除成功"),
    UPDATED(20005, "修改成功"),
    BAD_REQUEST(40000, "请求的地址不存在或者包含不支持的参数"),
    UNAUTHORIZED(40001,"未授权"),
    FORBIDDEN(40003,"被禁止访问"),
    NOT_FOUND(40004,"请求的资源不存在"),
    UNPROCESABLE_ENTITY(40022,"[POST/PUT/PATCH] 当创建一个对象时，发生一个验证错误"),
    INTERNAL_SERVER_ERROR(50000,"内部错误");

    private int status;
    private String msg;

    ResultEnums(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}